{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# financezhidao 说明\n",
    "0. **下载地址：** [百度知道](https://pan.baidu.com/s/1z1Rnnk-ubRSvzDu4UvLlIw)\n",
    "1. **数据概览：** 77万 条金融行业问答数据\n",
    "2. **推荐实验：** FAQ 问答系统\n",
    "3. **数据来源：** 百度知道\n",
    "4. **加工处理：**\n",
    "    1. 过滤了id、url、qid、reply_t、user字段\n",
    "    2. 对question、reply做了脱敏处理"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [],
   "source": [
    "import pandas as pd"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {},
   "outputs": [],
   "source": [
    "path = 'financezhidao_文件夹_所在_路径'"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# 1. financezhidao_filter.csv"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 加载数据"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {},
   "outputs": [],
   "source": [
    "pd_all = pd.read_csv(path + 'financezhidao_filter.csv')"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 字段说明\n",
    "\n",
    "| 字段 | 说明 |\n",
    "| ---- | ---- |\n",
    "| title | 标题 |\n",
    "| question | 问题（可为空） |\n",
    "| reply| 每个问题的内容 |\n",
    "| is_best| 是否是最佳答案 |"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {
    "scrolled": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>title</th>\n",
       "      <th>question</th>\n",
       "      <th>reply</th>\n",
       "      <th>is_best</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>678109</th>\n",
       "      <td>大家好，请问信用卡怎么分期，分期有什么用处呢</td>\n",
       "      <td>NaN</td>\n",
       "      <td>分期好提额，但是有利息</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>534025</th>\n",
       "      <td>本人在银行的存款，别人带本人的身份证可以取出来吗</td>\n",
       "      <td>NaN</td>\n",
       "      <td>若使用的是招商银行储蓄卡，在网点取款可代办，取款金额在1万元以上，需出示双人身份证原件和银行...</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>501941</th>\n",
       "      <td>向银行贷款30万一个月要多少利息</td>\n",
       "      <td>NaN</td>\n",
       "      <td>1000万</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>734438</th>\n",
       "      <td>招商信用卡还款怎么还，是每个月固定还多少钱，还是按照我们用款额度来算每个月还多少钱？</td>\n",
       "      <td>NaN</td>\n",
       "      <td>消费多少还多少，还款期内免利息。账单出来会提示你全额还多少，最低还多少的。</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>448905</th>\n",
       "      <td>年利率6每月多少钱</td>\n",
       "      <td>NaN</td>\n",
       "      <td>一年按12个月算的</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>521387</th>\n",
       "      <td>以卡办卡查卡里余额吗</td>\n",
       "      <td>NaN</td>\n",
       "      <td>若需查询招行一卡通余额，可通过电话银行，手机银行，网上银行（大众版和专业版），自助设备等渠道...</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>758812</th>\n",
       "      <td>2016年调整金融机构各个银行人民币存贷款基准利率是多少</td>\n",
       "      <td>NaN</td>\n",
       "      <td>这个问题的话，本金*利率*时间就可以算出来了总的存款利率的话一般都是有央*规定的，怕出现什么...</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>220626</th>\n",
       "      <td>请问一下，广信贷怎么样？这个理财真的可以赚？</td>\n",
       "      <td>NaN</td>\n",
       "      <td>所在城市若有招商银行，也可以了解下招行发售的理财产品，您可以进入招行主页，点击“理财产品”-...</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>86984</th>\n",
       "      <td>公积金断交后，补上可以申请公积金贷款吗</td>\n",
       "      <td>公积金交了一年了，但是断了大概5个月了，现在想申请公积金贷款，请问补上可以吗</td>\n",
       "      <td>住房公积金断了，需要当事人准备相应的补交材料给单位经办人，由单位的经办人去有关部门办理补缴手...</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20026</th>\n",
       "      <td>在哪里能借到钱</td>\n",
       "      <td>NaN</td>\n",
       "      <td>你要借多少</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>121538</th>\n",
       "      <td>哪有办理个人信用卡pos机</td>\n",
       "      <td>NaN</td>\n",
       "      <td>很多都可以办理</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>467245</th>\n",
       "      <td>身份证消磁了就不能办银行卡了吗</td>\n",
       "      <td>NaN</td>\n",
       "      <td>身份证读不出信息就是无效证件是没法去银行办理业务的目前部分银行支持临时身份证+辅助证明的方式...</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>730725</th>\n",
       "      <td>年薪20万，招行信用卡标准金卡额度能有多少？</td>\n",
       "      <td>NaN</td>\n",
       "      <td>正常来说一般是一万，要看你个人的信用度。这个情况要去银行问。</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>517301</th>\n",
       "      <td>自己可以拿家长的身份证办银行卡么吗</td>\n",
       "      <td>NaN</td>\n",
       "      <td>必须本人办理</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>255614</th>\n",
       "      <td>有没有人现在能借一千以内给我，急需，无前期，走今借到</td>\n",
       "      <td>NaN</td>\n",
       "      <td>那么晚了还出来诈骗</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>545539</th>\n",
       "      <td>招行信用卡查询密码怎么修改有多种方式</td>\n",
       "      <td>NaN</td>\n",
       "      <td>可以通过网银大众版、专业版、手机银行、掌上生活客户端、电话银行等渠道修改。</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>747413</th>\n",
       "      <td>信用卡面签被拒的原因是什么？</td>\n",
       "      <td>信用卡面签被拒的原因是什么？</td>\n",
       "      <td>若申请的是招行信用卡，最主要的条件是有稳定的工作和收入，必备申请文件为身份证明复印件和工作证...</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>669087</th>\n",
       "      <td>信用卡还款日提前一天会黑名单</td>\n",
       "      <td>NaN</td>\n",
       "      <td>你好，这个是不会的，信用卡还款日是指免息期的最后一天，在这个时间之前全额还款都是没有问题的。...</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>237058</th>\n",
       "      <td>求一个农村人可以借钱的软件，就几百块急用，在网上找了十几个认证了</td>\n",
       "      <td>求一个农村人可以借钱的软件，就几百块急用，在网上找了十几个认证了半天都不给借，求一个靠谱的</td>\n",
       "      <td>你好很高兴为您解答:qq现金贷不错</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>131290</th>\n",
       "      <td>我们办理房贷合同时银行工作人员给信用卡申请来填，那个信用卡的核实信息我答不上会影响放款吗</td>\n",
       "      <td>我们办理房贷合同时银行工作人员给信用卡申请来填，那个信用卡的核实信息我答不上会影响放款吗急用</td>\n",
       "      <td>若是在招行申请的个人住房贷款，信用卡的核发情况不影响贷款放款。贷款的最终审核是否能够通过，是...</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "                                               title  \\\n",
       "678109                        大家好，请问信用卡怎么分期，分期有什么用处呢   \n",
       "534025                      本人在银行的存款，别人带本人的身份证可以取出来吗   \n",
       "501941                              向银行贷款30万一个月要多少利息   \n",
       "734438    招商信用卡还款怎么还，是每个月固定还多少钱，还是按照我们用款额度来算每个月还多少钱？   \n",
       "448905                                     年利率6每月多少钱   \n",
       "521387                                    以卡办卡查卡里余额吗   \n",
       "758812                  2016年调整金融机构各个银行人民币存贷款基准利率是多少   \n",
       "220626                        请问一下，广信贷怎么样？这个理财真的可以赚？   \n",
       "86984                            公积金断交后，补上可以申请公积金贷款吗   \n",
       "20026                                        在哪里能借到钱   \n",
       "121538                                 哪有办理个人信用卡pos机   \n",
       "467245                               身份证消磁了就不能办银行卡了吗   \n",
       "730725                        年薪20万，招行信用卡标准金卡额度能有多少？   \n",
       "517301                             自己可以拿家长的身份证办银行卡么吗   \n",
       "255614                    有没有人现在能借一千以内给我，急需，无前期，走今借到   \n",
       "545539                            招行信用卡查询密码怎么修改有多种方式   \n",
       "747413                                信用卡面签被拒的原因是什么？   \n",
       "669087                                信用卡还款日提前一天会黑名单   \n",
       "237058              求一个农村人可以借钱的软件，就几百块急用，在网上找了十几个认证了   \n",
       "131290  我们办理房贷合同时银行工作人员给信用卡申请来填，那个信用卡的核实信息我答不上会影响放款吗   \n",
       "\n",
       "                                              question  \\\n",
       "678109                                             NaN   \n",
       "534025                                             NaN   \n",
       "501941                                             NaN   \n",
       "734438                                             NaN   \n",
       "448905                                             NaN   \n",
       "521387                                             NaN   \n",
       "758812                                             NaN   \n",
       "220626                                             NaN   \n",
       "86984           公积金交了一年了，但是断了大概5个月了，现在想申请公积金贷款，请问补上可以吗   \n",
       "20026                                              NaN   \n",
       "121538                                             NaN   \n",
       "467245                                             NaN   \n",
       "730725                                             NaN   \n",
       "517301                                             NaN   \n",
       "255614                                             NaN   \n",
       "545539                                             NaN   \n",
       "747413                                  信用卡面签被拒的原因是什么？   \n",
       "669087                                             NaN   \n",
       "237058   求一个农村人可以借钱的软件，就几百块急用，在网上找了十几个认证了半天都不给借，求一个靠谱的   \n",
       "131290  我们办理房贷合同时银行工作人员给信用卡申请来填，那个信用卡的核实信息我答不上会影响放款吗急用   \n",
       "\n",
       "                                                    reply  is_best  \n",
       "678109                                        分期好提额，但是有利息        0  \n",
       "534025  若使用的是招商银行储蓄卡，在网点取款可代办，取款金额在1万元以上，需出示双人身份证原件和银行...        1  \n",
       "501941                                              1000万        0  \n",
       "734438              消费多少还多少，还款期内免利息。账单出来会提示你全额还多少，最低还多少的。        1  \n",
       "448905                                          一年按12个月算的        0  \n",
       "521387  若需查询招行一卡通余额，可通过电话银行，手机银行，网上银行（大众版和专业版），自助设备等渠道...        1  \n",
       "758812  这个问题的话，本金*利率*时间就可以算出来了总的存款利率的话一般都是有央*规定的，怕出现什么...        0  \n",
       "220626  所在城市若有招商银行，也可以了解下招行发售的理财产品，您可以进入招行主页，点击“理财产品”-...        1  \n",
       "86984   住房公积金断了，需要当事人准备相应的补交材料给单位经办人，由单位的经办人去有关部门办理补缴手...        1  \n",
       "20026                                               你要借多少        0  \n",
       "121538                                            很多都可以办理        0  \n",
       "467245  身份证读不出信息就是无效证件是没法去银行办理业务的目前部分银行支持临时身份证+辅助证明的方式...        0  \n",
       "730725                     正常来说一般是一万，要看你个人的信用度。这个情况要去银行问。        0  \n",
       "517301                                             必须本人办理        0  \n",
       "255614                                          那么晚了还出来诈骗        0  \n",
       "545539              可以通过网银大众版、专业版、手机银行、掌上生活客户端、电话银行等渠道修改。        1  \n",
       "747413  若申请的是招行信用卡，最主要的条件是有稳定的工作和收入，必备申请文件为身份证明复印件和工作证...        1  \n",
       "669087  你好，这个是不会的，信用卡还款日是指免息期的最后一天，在这个时间之前全额还款都是没有问题的。...        0  \n",
       "237058                                  你好很高兴为您解答:qq现金贷不错        0  \n",
       "131290  若是在招行申请的个人住房贷款，信用卡的核发情况不影响贷款放款。贷款的最终审核是否能够通过，是...        1  "
      ]
     },
     "execution_count": 4,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "pd_all.sample(n=20)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.7.0"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
